// 主界面
;
define(function(require, exports, module) {
	'use strict';
	var base = require(CONFIG.BasePath + "js/enterprise/base");
	var router = require("../hash/pageRouter");
	var css_pickup = require("./interestDelayApplication.css");
	var databind = require("databind");
	var tools = require("tools");
	var financeId;

	var init = function(page) {
		financeId = page.params.financeId;
		databind.fillInput($("#interestDelayApplication"), {
			action: "inquireFinanceApplicationDetail.json?financeId=" + financeId
		});
		tools.inquireCommonSelectorList(9, $(".delayReson"));
		router.init();
		initEvent();
	};

	var initEvent = function() {
		if (base.getData("sid") == null) {
			location.href = "../login/login.html";
		}
		//点击项目基本详情financeDetail
		$(".financeDetail").unbind("click").click(function(){
			router.route("account/accountDetail.html?financeId="+financeId,true);
                	
		});
		$("#interestDelaySubmitBtn").unbind("click").click(function() {
			databind.submitDom($("#interestDelayApplication"), function() {
				router.route("account/accountDetail.html?financeId=" + financeId);
			});
		});
	};

	return {
		init: init
	};
});